<template lang="html">
  <div class="CroosswiseBanner-banner">
    <div class="title">
      <span class="title-left">{{ title }}</span>
      <router-link tag="span" to="/cityhot" class="title-right">更多>></router-link>
    </div>
    <div class="swiper-size">
      <swiper :options="swiperOption">
        <swiper-slide v-for="(slide, index) in swiperSlides" :key="index">
          <img class="swiperimg" :src="slide" alt="">
        </swiper-slide>
      </swiper>
    </div>
  </div>
</template>

<script>
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
export default {
  name:"Banner",
  data(){
    return{
      swiperSlides:[
        require("../assets/img/shouye02.png"),
        require("../assets/img/shouye03.png"),
        require("../assets/img/shouye05.png"),
        require("../assets/img/shouye06.png"),
        require("../assets/img/picture_GL01.png"),
        require("../assets/img/picture_GL02.png")
      ],
      // 轮播图配置
      swiperOption:{
        slidesPerView : 3,
        spaceBetween : 5,
        observer: true,
        observerParents: true

        // slidesOffsetBefore : 100,
      }
    }
  },
  components:{

  },
  props:{
    title:{
      type:String,
      default:""
    }
  }
}
</script>

<style lang="css" scoped>

.CroosswiseBanner-banner{
  font-size: 14px;
  padding:0 0.2rem;
  background-color: #fff;
}
.CroosswiseBanner-banner .title{
  overflow: hidden;
  width: 100%;
  line-height: 0.38rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid #e6e6e6;
}
.CroosswiseBanner-banner .title-left{
  display: inline-block;
  float: left;
  border-left: 0.16rem solid #7DD19D;
  font-size: 0.28rem;
  padding: 0 0 0 0.1rem;
}
.CroosswiseBanner-banner .title-right{
  display: inline-block;
  float: right;
  font-size: 0.24rem;
}
.swiper-size{
  padding: 0.1rem 0;
}
.swiper-size img{
  width: 100%;
}
.swiper-container{
  width: 100%;
  margin: 0.12rem 0 0 0;
}

</style>
